Filter hook 'postbox_classes_{$screen_id}_{$box_id}'

in WP Core File wp-admin/includes/post.php at line 1441

View Source

postbox_classes_{$screen_id}_{$box_id}

Filter Hook
Description
Filters the postbox classes for a specific screen and box ID combo. The dynamic portions of the hook name, `$screen_id` and `$box_id`, refer to the screen ID and meta box ID, respectively.

Hook Information

File Location wp-admin/includes/post.php View on GitHub
Hook Type Filter
Line Number 1441

Hook Parameters

Type Name Description
string[] $classes An array of postbox classes.

Usage Examples

Basic Usage
<?php
// Hook into postbox_classes_{$screen_id}_{$box_id}
add_filter('postbox_classes_{$screen_id}_{$box_id}', 'my_custom_filter', 10, 1);

function my_custom_filter($classes) {
    // Your custom filtering logic here
    return $classes;
}

Source Code Context

wp-admin/includes/post.php:1441 - How this hook is used in WordPress core
<?php
1436  	 *
1437  	 * @since 3.2.0
1438  	 *
1439  	 * @param string[] $classes An array of postbox classes.
1440  	 */
1441  	$classes = apply_filters( "postbox_classes_{$screen_id}_{$box_id}", $classes );
1442  
1443  	return implode( ' ', $classes );
1444  }
1445  
1446  /**

PHP Documentation

<?php
/**
	 * Filters the postbox classes for a specific screen and box ID combo.
	 *
	 * The dynamic portions of the hook name, `$screen_id` and `$box_id`, refer to
	 * the screen ID and meta box ID, respectively.
	 *
	 * @since 3.2.0
	 *
	 * @param string[] $classes An array of postbox classes.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/post.php
Related Hooks

Related hooks will be displayed here in future updates.